package com.yaoxuguang.concurrence.singletonAndThread.static_inner_class_model;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.singletonAndThread.static_inner_class_model
 * @Description: 静态内部类实现单例
 * @date 2018年12月25日17:29
 */
public class MyServer {
    private static class MyObject{
        private static MyServer myServer = new MyServer();
    }

    private MyServer() {
    }

    public static MyServer getInstance(){
        return MyObject.myServer;
    }
}
